@arbiwallet/contracts 1.0.119 → 1.0.120
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/card.ts +24 -1
- package/package.json +1 -1
- package/proto/card.proto +16 -1
package/gen/card.ts
CHANGED
|
@@ -207,7 +207,6 @@ export interface ScanGiftCardQrRequest {
|
|
|
207
207
|
accountId: number;
|
|
208
208
|
uid: number;
|
|
209
209
|
bin: string;
|
|
210
|
-
cardHolderName: string;
|
|
211
210
|
}
|
|
212
211
|
|
|
213
212
|
export interface ScanGiftCardQrResponse {
|
|
@@ -422,6 +421,20 @@ export interface GetRegionsResponse {
|
|
|
422
421
|
regions: string[];
|
|
423
422
|
}
|
|
424
423
|
|
|
424
|
+
export interface HandleBincentricWebhookRequest {
|
|
425
|
+
rawBody: Uint8Array;
|
|
426
|
+
webhookTimestamp: string;
|
|
427
|
+
webhookSignature: string;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
export interface HandleBincentricWebhookResponse {
|
|
431
|
+
ok: boolean;
|
|
432
|
+
handled: boolean;
|
|
433
|
+
eventType: string;
|
|
434
|
+
cardId: number;
|
|
435
|
+
reason: string;
|
|
436
|
+
}
|
|
437
|
+
|
|
425
438
|
export const CARD_V1_PACKAGE_NAME = "card.v1";
|
|
426
439
|
|
|
427
440
|
export interface CardServiceClient {
|
|
@@ -474,6 +487,8 @@ export interface CardServiceClient {
|
|
|
474
487
|
getAreaCodes(request: GetAreaCodesRequest): Observable<GetAreaCodesResponse>;
|
|
475
488
|
|
|
476
489
|
getRegions(request: GetRegionsRequest): Observable<GetRegionsResponse>;
|
|
490
|
+
|
|
491
|
+
handleBincentricWebhook(request: HandleBincentricWebhookRequest): Observable<HandleBincentricWebhookResponse>;
|
|
477
492
|
}
|
|
478
493
|
|
|
479
494
|
export interface CardServiceController {
|
|
@@ -567,6 +582,13 @@ export interface CardServiceController {
|
|
|
567
582
|
getRegions(
|
|
568
583
|
request: GetRegionsRequest,
|
|
569
584
|
): Promise<GetRegionsResponse> | Observable<GetRegionsResponse> | GetRegionsResponse;
|
|
585
|
+
|
|
586
|
+
handleBincentricWebhook(
|
|
587
|
+
request: HandleBincentricWebhookRequest,
|
|
588
|
+
):
|
|
589
|
+
| Promise<HandleBincentricWebhookResponse>
|
|
590
|
+
| Observable<HandleBincentricWebhookResponse>
|
|
591
|
+
| HandleBincentricWebhookResponse;
|
|
570
592
|
}
|
|
571
593
|
|
|
572
594
|
export function CardServiceControllerMethods() {
|
|
@@ -597,6 +619,7 @@ export function CardServiceControllerMethods() {
|
|
|
597
619
|
"getBinsExists",
|
|
598
620
|
"getAreaCodes",
|
|
599
621
|
"getRegions",
|
|
622
|
+
"handleBincentricWebhook",
|
|
600
623
|
];
|
|
601
624
|
for (const method of grpcMethods) {
|
|
602
625
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
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.120",
|
|
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/card.proto
CHANGED
|
@@ -36,6 +36,8 @@ service CardService {
|
|
|
36
36
|
rpc GetBinsExists(GetBinsExistsRequest) returns (GetBinsExistsResponse);
|
|
37
37
|
rpc GetAreaCodes(GetAreaCodesRequest) returns (GetAreaCodesResponse);
|
|
38
38
|
rpc GetRegions(GetRegionsRequest) returns (GetRegionsResponse);
|
|
39
|
+
|
|
40
|
+
rpc HandleBincentricWebhook(HandleBincentricWebhookRequest) returns (HandleBincentricWebhookResponse);
|
|
39
41
|
}
|
|
40
42
|
|
|
41
43
|
enum CardStatus {
|
|
@@ -235,7 +237,6 @@ message ScanGiftCardQrRequest {
|
|
|
235
237
|
int64 account_id = 1;
|
|
236
238
|
int64 uid = 2;
|
|
237
239
|
string bin = 3;
|
|
238
|
-
string card_holder_name = 4;
|
|
239
240
|
}
|
|
240
241
|
|
|
241
242
|
message ScanGiftCardQrResponse {
|
|
@@ -449,3 +450,17 @@ message GetAreaCodesResponse {
|
|
|
449
450
|
message GetRegionsResponse {
|
|
450
451
|
repeated string regions = 1;
|
|
451
452
|
}
|
|
453
|
+
|
|
454
|
+
message HandleBincentricWebhookRequest {
|
|
455
|
+
bytes raw_body = 1;
|
|
456
|
+
string webhook_timestamp = 2;
|
|
457
|
+
string webhook_signature = 3;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
message HandleBincentricWebhookResponse {
|
|
461
|
+
bool ok = 1;
|
|
462
|
+
bool handled = 2;
|
|
463
|
+
string event_type = 3;
|
|
464
|
+
int64 card_id = 4;
|
|
465
|
+
string reason = 5;
|
|
466
|
+
}
|