@arbiwallet/contracts 1.0.117 → 1.0.119
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 +1 -24
- package/gen/crm_gift_card.ts +20 -1
- package/package.json +1 -1
- package/proto/card.proto +1 -16
- package/proto/crm_gift_card.proto +14 -0
package/gen/card.ts
CHANGED
|
@@ -207,6 +207,7 @@ export interface ScanGiftCardQrRequest {
|
|
|
207
207
|
accountId: number;
|
|
208
208
|
uid: number;
|
|
209
209
|
bin: string;
|
|
210
|
+
cardHolderName: string;
|
|
210
211
|
}
|
|
211
212
|
|
|
212
213
|
export interface ScanGiftCardQrResponse {
|
|
@@ -421,20 +422,6 @@ export interface GetRegionsResponse {
|
|
|
421
422
|
regions: string[];
|
|
422
423
|
}
|
|
423
424
|
|
|
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
|
-
|
|
438
425
|
export const CARD_V1_PACKAGE_NAME = "card.v1";
|
|
439
426
|
|
|
440
427
|
export interface CardServiceClient {
|
|
@@ -487,8 +474,6 @@ export interface CardServiceClient {
|
|
|
487
474
|
getAreaCodes(request: GetAreaCodesRequest): Observable<GetAreaCodesResponse>;
|
|
488
475
|
|
|
489
476
|
getRegions(request: GetRegionsRequest): Observable<GetRegionsResponse>;
|
|
490
|
-
|
|
491
|
-
handleBincentricWebhook(request: HandleBincentricWebhookRequest): Observable<HandleBincentricWebhookResponse>;
|
|
492
477
|
}
|
|
493
478
|
|
|
494
479
|
export interface CardServiceController {
|
|
@@ -582,13 +567,6 @@ export interface CardServiceController {
|
|
|
582
567
|
getRegions(
|
|
583
568
|
request: GetRegionsRequest,
|
|
584
569
|
): Promise<GetRegionsResponse> | Observable<GetRegionsResponse> | GetRegionsResponse;
|
|
585
|
-
|
|
586
|
-
handleBincentricWebhook(
|
|
587
|
-
request: HandleBincentricWebhookRequest,
|
|
588
|
-
):
|
|
589
|
-
| Promise<HandleBincentricWebhookResponse>
|
|
590
|
-
| Observable<HandleBincentricWebhookResponse>
|
|
591
|
-
| HandleBincentricWebhookResponse;
|
|
592
570
|
}
|
|
593
571
|
|
|
594
572
|
export function CardServiceControllerMethods() {
|
|
@@ -619,7 +597,6 @@ export function CardServiceControllerMethods() {
|
|
|
619
597
|
"getBinsExists",
|
|
620
598
|
"getAreaCodes",
|
|
621
599
|
"getRegions",
|
|
622
|
-
"handleBincentricWebhook",
|
|
623
600
|
];
|
|
624
601
|
for (const method of grpcMethods) {
|
|
625
602
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/gen/crm_gift_card.ts
CHANGED
|
@@ -10,6 +10,19 @@ import { Observable } from "rxjs";
|
|
|
10
10
|
|
|
11
11
|
export const protobufPackage = "crm_gift_card";
|
|
12
12
|
|
|
13
|
+
export interface PreviewGiftCardQrRequest {
|
|
14
|
+
qrPayload: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface PreviewGiftCardQrResponse {
|
|
18
|
+
success: boolean;
|
|
19
|
+
status: string;
|
|
20
|
+
error: string;
|
|
21
|
+
userId: number;
|
|
22
|
+
uid: number;
|
|
23
|
+
cardBin: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
13
26
|
export interface ScanGiftCardQrRequest {
|
|
14
27
|
qrPayload: string;
|
|
15
28
|
}
|
|
@@ -60,6 +73,8 @@ export interface ListGiftCardScansResponse {
|
|
|
60
73
|
export const CRM_GIFT_CARD_PACKAGE_NAME = "crm_gift_card";
|
|
61
74
|
|
|
62
75
|
export interface CrmGiftCardServiceClient {
|
|
76
|
+
previewGiftCardQr(request: PreviewGiftCardQrRequest): Observable<PreviewGiftCardQrResponse>;
|
|
77
|
+
|
|
63
78
|
scanGiftCardQr(request: ScanGiftCardQrRequest): Observable<ScanGiftCardQrResponse>;
|
|
64
79
|
|
|
65
80
|
getGiftCardStats(request: GetGiftCardStatsRequest): Observable<GetGiftCardStatsResponse>;
|
|
@@ -68,6 +83,10 @@ export interface CrmGiftCardServiceClient {
|
|
|
68
83
|
}
|
|
69
84
|
|
|
70
85
|
export interface CrmGiftCardServiceController {
|
|
86
|
+
previewGiftCardQr(
|
|
87
|
+
request: PreviewGiftCardQrRequest,
|
|
88
|
+
): Promise<PreviewGiftCardQrResponse> | Observable<PreviewGiftCardQrResponse> | PreviewGiftCardQrResponse;
|
|
89
|
+
|
|
71
90
|
scanGiftCardQr(
|
|
72
91
|
request: ScanGiftCardQrRequest,
|
|
73
92
|
): Promise<ScanGiftCardQrResponse> | Observable<ScanGiftCardQrResponse> | ScanGiftCardQrResponse;
|
|
@@ -83,7 +102,7 @@ export interface CrmGiftCardServiceController {
|
|
|
83
102
|
|
|
84
103
|
export function CrmGiftCardServiceControllerMethods() {
|
|
85
104
|
return function (constructor: Function) {
|
|
86
|
-
const grpcMethods: string[] = ["scanGiftCardQr", "getGiftCardStats", "listGiftCardScans"];
|
|
105
|
+
const grpcMethods: string[] = ["previewGiftCardQr", "scanGiftCardQr", "getGiftCardStats", "listGiftCardScans"];
|
|
87
106
|
for (const method of grpcMethods) {
|
|
88
107
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
89
108
|
GrpcMethod("CrmGiftCardService", method)(constructor.prototype[method], method, descriptor);
|
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.119",
|
|
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,8 +36,6 @@ 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);
|
|
41
39
|
}
|
|
42
40
|
|
|
43
41
|
enum CardStatus {
|
|
@@ -237,6 +235,7 @@ message ScanGiftCardQrRequest {
|
|
|
237
235
|
int64 account_id = 1;
|
|
238
236
|
int64 uid = 2;
|
|
239
237
|
string bin = 3;
|
|
238
|
+
string card_holder_name = 4;
|
|
240
239
|
}
|
|
241
240
|
|
|
242
241
|
message ScanGiftCardQrResponse {
|
|
@@ -450,17 +449,3 @@ message GetAreaCodesResponse {
|
|
|
450
449
|
message GetRegionsResponse {
|
|
451
450
|
repeated string regions = 1;
|
|
452
451
|
}
|
|
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
|
-
}
|
|
@@ -2,11 +2,25 @@ syntax = "proto3";
|
|
|
2
2
|
package crm_gift_card;
|
|
3
3
|
|
|
4
4
|
service CrmGiftCardService {
|
|
5
|
+
rpc PreviewGiftCardQr (PreviewGiftCardQrRequest) returns (PreviewGiftCardQrResponse);
|
|
5
6
|
rpc ScanGiftCardQr (ScanGiftCardQrRequest) returns (ScanGiftCardQrResponse);
|
|
6
7
|
rpc GetGiftCardStats (GetGiftCardStatsRequest) returns (GetGiftCardStatsResponse);
|
|
7
8
|
rpc ListGiftCardScans (ListGiftCardScansRequest) returns (ListGiftCardScansResponse);
|
|
8
9
|
}
|
|
9
10
|
|
|
11
|
+
message PreviewGiftCardQrRequest {
|
|
12
|
+
string qr_payload = 1;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
message PreviewGiftCardQrResponse {
|
|
16
|
+
bool success = 1;
|
|
17
|
+
string status = 2;
|
|
18
|
+
string error = 3;
|
|
19
|
+
int64 user_id = 4;
|
|
20
|
+
int64 uid = 5;
|
|
21
|
+
string card_bin = 6;
|
|
22
|
+
}
|
|
23
|
+
|
|
10
24
|
message ScanGiftCardQrRequest {
|
|
11
25
|
string qr_payload = 1;
|
|
12
26
|
}
|