@arbiwallet/contracts 1.0.236 → 1.0.238
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_core.ts +86 -0
- package/gen/user.ts +80 -0
- package/package.json +1 -1
- package/proto/exchange_core.proto +69 -0
- package/proto/user.proto +46 -0
package/gen/exchange_core.ts
CHANGED
|
@@ -259,6 +259,71 @@ export interface ExchangeCalculationsFiltersRequest {
|
|
|
259
259
|
search?: string | undefined;
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
+
export interface CreateExchangePaymentRequest {
|
|
263
|
+
managerUserId?: string | undefined;
|
|
264
|
+
managerId?: string | undefined;
|
|
265
|
+
calculationId?: string | undefined;
|
|
266
|
+
agentId: number;
|
|
267
|
+
amount?: number | undefined;
|
|
268
|
+
customerId?: string | undefined;
|
|
269
|
+
cryptoNetwork?: string | undefined;
|
|
270
|
+
customerSource?: string | undefined;
|
|
271
|
+
customerReferrer?: string | undefined;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export interface CreateExchangePaymentResult {
|
|
275
|
+
paymentId: string;
|
|
276
|
+
paymentUuid: string;
|
|
277
|
+
amount: number;
|
|
278
|
+
status: number;
|
|
279
|
+
agent: string;
|
|
280
|
+
walletId?: string | undefined;
|
|
281
|
+
cryptoNetwork?: string | undefined;
|
|
282
|
+
cryptoAddress?: string | undefined;
|
|
283
|
+
arbiLink?: string | undefined;
|
|
284
|
+
paymentLink?: string | undefined;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
export interface CreateExchangePaymentResponse {
|
|
288
|
+
ok: boolean;
|
|
289
|
+
result?: CreateExchangePaymentResult | undefined;
|
|
290
|
+
error?: string | undefined;
|
|
291
|
+
validationErrors?: { [key: string]: any } | undefined;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
export interface HandlePaymentWebhookRequest {
|
|
295
|
+
jsonPayload: string;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
export interface HandlePaymentWebhookResponse {
|
|
299
|
+
ok: boolean;
|
|
300
|
+
status: string;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
export interface GetExchangePaymentsRequest {
|
|
304
|
+
page?: number | undefined;
|
|
305
|
+
limit?: number | undefined;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export interface GetExchangePaymentsItem {
|
|
309
|
+
paymentId: string;
|
|
310
|
+
paymentUuid: string;
|
|
311
|
+
amount: number;
|
|
312
|
+
status: number;
|
|
313
|
+
paymentAgentStatus?: string | undefined;
|
|
314
|
+
paymentLink?: string | undefined;
|
|
315
|
+
qrLink?: string | undefined;
|
|
316
|
+
cryptoAddress?: string | undefined;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export interface GetExchangePaymentsResponse {
|
|
320
|
+
payments: GetExchangePaymentsItem[];
|
|
321
|
+
page: number;
|
|
322
|
+
limit: number;
|
|
323
|
+
total: number;
|
|
324
|
+
totalPages: number;
|
|
325
|
+
}
|
|
326
|
+
|
|
262
327
|
export interface PaymentsSummaryItem {
|
|
263
328
|
currency: string;
|
|
264
329
|
total: number;
|
|
@@ -404,6 +469,12 @@ export interface ExchangeCoreServiceClient {
|
|
|
404
469
|
|
|
405
470
|
getTransactionsSummary(request: GetTransactionsSummaryRequest): Observable<GetTransactionsSummaryResponse>;
|
|
406
471
|
|
|
472
|
+
createExchangePayment(request: CreateExchangePaymentRequest): Observable<CreateExchangePaymentResponse>;
|
|
473
|
+
|
|
474
|
+
handlePaymentWebhook(request: HandlePaymentWebhookRequest): Observable<HandlePaymentWebhookResponse>;
|
|
475
|
+
|
|
476
|
+
getExchangePayments(request: GetExchangePaymentsRequest): Observable<GetExchangePaymentsResponse>;
|
|
477
|
+
|
|
407
478
|
getPaymentsSummary(request: ExchangeCalculationsFiltersRequest): Observable<GetPaymentsSummaryResponse>;
|
|
408
479
|
|
|
409
480
|
getWallets(request: GetWalletsRequest): Observable<GetWalletsResponse>;
|
|
@@ -449,6 +520,18 @@ export interface ExchangeCoreServiceController {
|
|
|
449
520
|
| Observable<GetTransactionsSummaryResponse>
|
|
450
521
|
| GetTransactionsSummaryResponse;
|
|
451
522
|
|
|
523
|
+
createExchangePayment(
|
|
524
|
+
request: CreateExchangePaymentRequest,
|
|
525
|
+
): Promise<CreateExchangePaymentResponse> | Observable<CreateExchangePaymentResponse> | CreateExchangePaymentResponse;
|
|
526
|
+
|
|
527
|
+
handlePaymentWebhook(
|
|
528
|
+
request: HandlePaymentWebhookRequest,
|
|
529
|
+
): Promise<HandlePaymentWebhookResponse> | Observable<HandlePaymentWebhookResponse> | HandlePaymentWebhookResponse;
|
|
530
|
+
|
|
531
|
+
getExchangePayments(
|
|
532
|
+
request: GetExchangePaymentsRequest,
|
|
533
|
+
): Promise<GetExchangePaymentsResponse> | Observable<GetExchangePaymentsResponse> | GetExchangePaymentsResponse;
|
|
534
|
+
|
|
452
535
|
getPaymentsSummary(
|
|
453
536
|
request: ExchangeCalculationsFiltersRequest,
|
|
454
537
|
): Promise<GetPaymentsSummaryResponse> | Observable<GetPaymentsSummaryResponse> | GetPaymentsSummaryResponse;
|
|
@@ -484,6 +567,9 @@ export function ExchangeCoreServiceControllerMethods() {
|
|
|
484
567
|
"cancelExchangeDeal",
|
|
485
568
|
"getTransactions",
|
|
486
569
|
"getTransactionsSummary",
|
|
570
|
+
"createExchangePayment",
|
|
571
|
+
"handlePaymentWebhook",
|
|
572
|
+
"getExchangePayments",
|
|
487
573
|
"getPaymentsSummary",
|
|
488
574
|
"getWallets",
|
|
489
575
|
"getWalletsMonika",
|
package/gen/user.ts
CHANGED
|
@@ -291,6 +291,48 @@ export interface FindMonikaCustomerResponse {
|
|
|
291
291
|
jwt?: string | undefined;
|
|
292
292
|
}
|
|
293
293
|
|
|
294
|
+
export interface CreateMonikaSessionUtmRequest {
|
|
295
|
+
utmDataJson?: string | undefined;
|
|
296
|
+
clientId?: string | undefined;
|
|
297
|
+
gClientId?: string | undefined;
|
|
298
|
+
gclid?: string | undefined;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export interface CreateMonikaSessionUtmResponse {
|
|
302
|
+
success: boolean;
|
|
303
|
+
jwt: string;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
export interface GetMonikaSessionUtmByIdRequest {
|
|
307
|
+
id: number;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
export interface GetMonikaSessionUtmByIdResponse {
|
|
311
|
+
success: boolean;
|
|
312
|
+
jwt: string;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
export interface ListMonikaSessionUtmsRequest {
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
export interface ListMonikaSessionUtmsResponse {
|
|
319
|
+
success: boolean;
|
|
320
|
+
jwt: string;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
export interface PatchMonikaSessionUtmRequest {
|
|
324
|
+
id: number;
|
|
325
|
+
utmDataJson?: string | undefined;
|
|
326
|
+
clientId?: string | undefined;
|
|
327
|
+
gClientId?: string | undefined;
|
|
328
|
+
gclid?: string | undefined;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
export interface PatchMonikaSessionUtmResponse {
|
|
332
|
+
success: boolean;
|
|
333
|
+
jwt: string;
|
|
334
|
+
}
|
|
335
|
+
|
|
294
336
|
export interface UpdateLanguageByTelegramIdRequest {
|
|
295
337
|
telegramId: string;
|
|
296
338
|
language: string;
|
|
@@ -501,6 +543,16 @@ export interface UserServiceClient {
|
|
|
501
543
|
|
|
502
544
|
findMonikaCustomer(request: FindMonikaCustomerRequest): Observable<FindMonikaCustomerResponse>;
|
|
503
545
|
|
|
546
|
+
/** Monika-compatible UTM session create/get. */
|
|
547
|
+
|
|
548
|
+
createMonikaSessionUtm(request: CreateMonikaSessionUtmRequest): Observable<CreateMonikaSessionUtmResponse>;
|
|
549
|
+
|
|
550
|
+
getMonikaSessionUtmById(request: GetMonikaSessionUtmByIdRequest): Observable<GetMonikaSessionUtmByIdResponse>;
|
|
551
|
+
|
|
552
|
+
listMonikaSessionUtms(request: ListMonikaSessionUtmsRequest): Observable<ListMonikaSessionUtmsResponse>;
|
|
553
|
+
|
|
554
|
+
patchMonikaSessionUtm(request: PatchMonikaSessionUtmRequest): Observable<PatchMonikaSessionUtmResponse>;
|
|
555
|
+
|
|
504
556
|
updateLanguageByTelegramId(request: UpdateLanguageByTelegramIdRequest): Observable<TelegramUserLanguageResponse>;
|
|
505
557
|
|
|
506
558
|
/** Реферальная ссылка MONETA по telegram_id → ref_code → https://arbi.exchange/contacts/qr?code=… */
|
|
@@ -664,6 +716,30 @@ export interface UserServiceController {
|
|
|
664
716
|
request: FindMonikaCustomerRequest,
|
|
665
717
|
): Promise<FindMonikaCustomerResponse> | Observable<FindMonikaCustomerResponse> | FindMonikaCustomerResponse;
|
|
666
718
|
|
|
719
|
+
/** Monika-compatible UTM session create/get. */
|
|
720
|
+
|
|
721
|
+
createMonikaSessionUtm(
|
|
722
|
+
request: CreateMonikaSessionUtmRequest,
|
|
723
|
+
):
|
|
724
|
+
| Promise<CreateMonikaSessionUtmResponse>
|
|
725
|
+
| Observable<CreateMonikaSessionUtmResponse>
|
|
726
|
+
| CreateMonikaSessionUtmResponse;
|
|
727
|
+
|
|
728
|
+
getMonikaSessionUtmById(
|
|
729
|
+
request: GetMonikaSessionUtmByIdRequest,
|
|
730
|
+
):
|
|
731
|
+
| Promise<GetMonikaSessionUtmByIdResponse>
|
|
732
|
+
| Observable<GetMonikaSessionUtmByIdResponse>
|
|
733
|
+
| GetMonikaSessionUtmByIdResponse;
|
|
734
|
+
|
|
735
|
+
listMonikaSessionUtms(
|
|
736
|
+
request: ListMonikaSessionUtmsRequest,
|
|
737
|
+
): Promise<ListMonikaSessionUtmsResponse> | Observable<ListMonikaSessionUtmsResponse> | ListMonikaSessionUtmsResponse;
|
|
738
|
+
|
|
739
|
+
patchMonikaSessionUtm(
|
|
740
|
+
request: PatchMonikaSessionUtmRequest,
|
|
741
|
+
): Promise<PatchMonikaSessionUtmResponse> | Observable<PatchMonikaSessionUtmResponse> | PatchMonikaSessionUtmResponse;
|
|
742
|
+
|
|
667
743
|
updateLanguageByTelegramId(
|
|
668
744
|
request: UpdateLanguageByTelegramIdRequest,
|
|
669
745
|
): Promise<TelegramUserLanguageResponse> | Observable<TelegramUserLanguageResponse> | TelegramUserLanguageResponse;
|
|
@@ -753,6 +829,10 @@ export function UserServiceControllerMethods() {
|
|
|
753
829
|
"ensureTelegramUser",
|
|
754
830
|
"createMonikaCustomer",
|
|
755
831
|
"findMonikaCustomer",
|
|
832
|
+
"createMonikaSessionUtm",
|
|
833
|
+
"getMonikaSessionUtmById",
|
|
834
|
+
"listMonikaSessionUtms",
|
|
835
|
+
"patchMonikaSessionUtm",
|
|
756
836
|
"updateLanguageByTelegramId",
|
|
757
837
|
"getReferralLinkByTelegramId",
|
|
758
838
|
"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.238",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
|
|
7
7
|
},
|
|
@@ -18,6 +18,9 @@ service ExchangeCoreService {
|
|
|
18
18
|
rpc GetTransactions(GetTransactionsRequest) returns (GetTransactionsResponse);
|
|
19
19
|
rpc GetTransactionsSummary(GetTransactionsSummaryRequest) returns (GetTransactionsSummaryResponse);
|
|
20
20
|
|
|
21
|
+
rpc CreateExchangePayment(CreateExchangePaymentRequest) returns (CreateExchangePaymentResponse);
|
|
22
|
+
rpc HandlePaymentWebhook(HandlePaymentWebhookRequest) returns (HandlePaymentWebhookResponse);
|
|
23
|
+
rpc GetExchangePayments(GetExchangePaymentsRequest) returns (GetExchangePaymentsResponse);
|
|
21
24
|
rpc GetPaymentsSummary(ExchangeCalculationsFiltersRequest) returns (GetPaymentsSummaryResponse);
|
|
22
25
|
|
|
23
26
|
rpc GetWallets(GetWalletsRequest) returns (GetWalletsResponse);
|
|
@@ -282,6 +285,72 @@ message ExchangeCalculationsFiltersRequest {
|
|
|
282
285
|
optional string search = 8;
|
|
283
286
|
}
|
|
284
287
|
|
|
288
|
+
message CreateExchangePaymentRequest {
|
|
289
|
+
optional string manager_user_id = 1;
|
|
290
|
+
optional string manager_id = 2;
|
|
291
|
+
|
|
292
|
+
optional string calculation_id = 3;
|
|
293
|
+
int32 agent_id = 4;
|
|
294
|
+
optional double amount = 5;
|
|
295
|
+
optional string customer_id = 6;
|
|
296
|
+
optional string crypto_network = 7;
|
|
297
|
+
optional string customer_source = 8;
|
|
298
|
+
optional string customer_referrer = 9;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
message CreateExchangePaymentResult {
|
|
302
|
+
string payment_id = 1;
|
|
303
|
+
string payment_uuid = 2;
|
|
304
|
+
double amount = 3;
|
|
305
|
+
int32 status = 4;
|
|
306
|
+
string agent = 5;
|
|
307
|
+
optional string wallet_id = 6;
|
|
308
|
+
optional string crypto_network = 7;
|
|
309
|
+
optional string crypto_address = 8;
|
|
310
|
+
optional string arbi_link = 9;
|
|
311
|
+
optional string payment_link = 10;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
message CreateExchangePaymentResponse {
|
|
315
|
+
bool ok = 1;
|
|
316
|
+
optional CreateExchangePaymentResult result = 2;
|
|
317
|
+
optional string error = 3;
|
|
318
|
+
optional google.protobuf.Struct validationErrors = 4;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
message HandlePaymentWebhookRequest {
|
|
322
|
+
string json_payload = 1;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
message HandlePaymentWebhookResponse {
|
|
326
|
+
bool ok = 1;
|
|
327
|
+
string status = 2;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
message GetExchangePaymentsRequest {
|
|
331
|
+
optional int32 page = 1;
|
|
332
|
+
optional int32 limit = 2;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
message GetExchangePaymentsItem {
|
|
336
|
+
string payment_id = 1;
|
|
337
|
+
string payment_uuid = 2;
|
|
338
|
+
double amount = 3;
|
|
339
|
+
int32 status = 4;
|
|
340
|
+
optional string payment_agent_status = 5;
|
|
341
|
+
optional string payment_link = 6;
|
|
342
|
+
optional string qr_link = 7;
|
|
343
|
+
optional string crypto_address = 8;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
message GetExchangePaymentsResponse {
|
|
347
|
+
repeated GetExchangePaymentsItem payments = 1;
|
|
348
|
+
int32 page = 2;
|
|
349
|
+
int32 limit = 3;
|
|
350
|
+
int32 total = 4;
|
|
351
|
+
int32 total_pages = 5;
|
|
352
|
+
}
|
|
353
|
+
|
|
285
354
|
message PaymentsSummaryItem {
|
|
286
355
|
string currency = 1;
|
|
287
356
|
double total = 2;
|
package/proto/user.proto
CHANGED
|
@@ -35,6 +35,11 @@ service UserService {
|
|
|
35
35
|
rpc CreateMonikaCustomer (CreateMonikaCustomerRequest) returns (CreateMonikaCustomerResponse);
|
|
36
36
|
// Monika-compatible customer lookup by filter_by or customer id.
|
|
37
37
|
rpc FindMonikaCustomer (FindMonikaCustomerRequest) returns (FindMonikaCustomerResponse);
|
|
38
|
+
// Monika-compatible UTM session create/get.
|
|
39
|
+
rpc CreateMonikaSessionUtm (CreateMonikaSessionUtmRequest) returns (CreateMonikaSessionUtmResponse);
|
|
40
|
+
rpc GetMonikaSessionUtmById (GetMonikaSessionUtmByIdRequest) returns (GetMonikaSessionUtmByIdResponse);
|
|
41
|
+
rpc ListMonikaSessionUtms (ListMonikaSessionUtmsRequest) returns (ListMonikaSessionUtmsResponse);
|
|
42
|
+
rpc PatchMonikaSessionUtm (PatchMonikaSessionUtmRequest) returns (PatchMonikaSessionUtmResponse);
|
|
38
43
|
rpc UpdateLanguageByTelegramId (UpdateLanguageByTelegramIdRequest) returns (TelegramUserLanguageResponse);
|
|
39
44
|
// Реферальная ссылка MONETA по telegram_id → ref_code → https://arbi.exchange/contacts/qr?code=…
|
|
40
45
|
rpc GetReferralLinkByTelegramId (GetReferralLinkByTelegramIdRequest) returns (GetReferralLinkByTelegramIdResponse);
|
|
@@ -329,6 +334,47 @@ message FindMonikaCustomerResponse {
|
|
|
329
334
|
optional string jwt = 2;
|
|
330
335
|
}
|
|
331
336
|
|
|
337
|
+
message CreateMonikaSessionUtmRequest {
|
|
338
|
+
optional string utm_data_json = 1;
|
|
339
|
+
optional string client_id = 2;
|
|
340
|
+
optional string g_client_id = 3;
|
|
341
|
+
optional string gclid = 4;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
message CreateMonikaSessionUtmResponse {
|
|
345
|
+
bool success = 1;
|
|
346
|
+
string jwt = 2;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
message GetMonikaSessionUtmByIdRequest {
|
|
350
|
+
int32 id = 1;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
message GetMonikaSessionUtmByIdResponse {
|
|
354
|
+
bool success = 1;
|
|
355
|
+
string jwt = 2;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
message ListMonikaSessionUtmsRequest {}
|
|
359
|
+
|
|
360
|
+
message ListMonikaSessionUtmsResponse {
|
|
361
|
+
bool success = 1;
|
|
362
|
+
string jwt = 2;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
message PatchMonikaSessionUtmRequest {
|
|
366
|
+
int32 id = 1;
|
|
367
|
+
optional string utm_data_json = 2;
|
|
368
|
+
optional string client_id = 3;
|
|
369
|
+
optional string g_client_id = 4;
|
|
370
|
+
optional string gclid = 5;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
message PatchMonikaSessionUtmResponse {
|
|
374
|
+
bool success = 1;
|
|
375
|
+
string jwt = 2;
|
|
376
|
+
}
|
|
377
|
+
|
|
332
378
|
message UpdateLanguageByTelegramIdRequest {
|
|
333
379
|
string telegram_id = 1;
|
|
334
380
|
string language = 2;
|