@arbiwallet/contracts 1.0.110 → 1.0.112
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 +19 -0
- package/gen/content.ts +119 -0
- package/gen/crm_gift_card.ts +99 -0
- package/package.json +1 -1
- package/proto/card.proto +13 -0
- package/proto/content.proto +68 -0
- package/proto/crm_gift_card.proto +54 -0
package/gen/card.ts
CHANGED
|
@@ -203,6 +203,18 @@ export interface ExecuteCreateWithLedgerResponse {
|
|
|
203
203
|
sufficientBalance: boolean;
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
+
export interface ScanGiftCardQrRequest {
|
|
207
|
+
accountId: number;
|
|
208
|
+
uid: number;
|
|
209
|
+
bin: string;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export interface ScanGiftCardQrResponse {
|
|
213
|
+
success: boolean;
|
|
214
|
+
requiredAmount: string;
|
|
215
|
+
cardId: number;
|
|
216
|
+
}
|
|
217
|
+
|
|
206
218
|
export interface ListCardsRequest {
|
|
207
219
|
accountId: number;
|
|
208
220
|
}
|
|
@@ -428,6 +440,8 @@ export interface CardServiceClient {
|
|
|
428
440
|
|
|
429
441
|
executeCreateWithLedger(request: ExecuteCreateWithLedgerRequest): Observable<ExecuteCreateWithLedgerResponse>;
|
|
430
442
|
|
|
443
|
+
scanGiftCardQr(request: ScanGiftCardQrRequest): Observable<ScanGiftCardQrResponse>;
|
|
444
|
+
|
|
431
445
|
listCards(request: ListCardsRequest): Observable<ListCardsResponse>;
|
|
432
446
|
|
|
433
447
|
listCardsPaginated(request: ListCardsPaginatedRequest): Observable<ListCardsPaginatedResponse>;
|
|
@@ -496,6 +510,10 @@ export interface CardServiceController {
|
|
|
496
510
|
| Observable<ExecuteCreateWithLedgerResponse>
|
|
497
511
|
| ExecuteCreateWithLedgerResponse;
|
|
498
512
|
|
|
513
|
+
scanGiftCardQr(
|
|
514
|
+
request: ScanGiftCardQrRequest,
|
|
515
|
+
): Promise<ScanGiftCardQrResponse> | Observable<ScanGiftCardQrResponse> | ScanGiftCardQrResponse;
|
|
516
|
+
|
|
499
517
|
listCards(request: ListCardsRequest): Promise<ListCardsResponse> | Observable<ListCardsResponse> | ListCardsResponse;
|
|
500
518
|
|
|
501
519
|
listCardsPaginated(
|
|
@@ -561,6 +579,7 @@ export function CardServiceControllerMethods() {
|
|
|
561
579
|
"quoteTopupByTarget",
|
|
562
580
|
"executeTopupWithLedger",
|
|
563
581
|
"executeCreateWithLedger",
|
|
582
|
+
"scanGiftCardQr",
|
|
564
583
|
"listCards",
|
|
565
584
|
"listCardsPaginated",
|
|
566
585
|
"getCard",
|
package/gen/content.ts
CHANGED
|
@@ -32,6 +32,13 @@ export interface GetPublicBlogsResponse {
|
|
|
32
32
|
blogs: Blog[];
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
export interface GetPublicStoriesRequest {
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface GetPublicStoriesResponse {
|
|
39
|
+
stories: Story[];
|
|
40
|
+
}
|
|
41
|
+
|
|
35
42
|
export interface CreateBannerRequest {
|
|
36
43
|
imageUrl: string;
|
|
37
44
|
order: number;
|
|
@@ -258,6 +265,45 @@ export interface ReorderBlogsRequest {
|
|
|
258
265
|
export interface ReorderBlogsResponse {
|
|
259
266
|
}
|
|
260
267
|
|
|
268
|
+
export interface CreateStoryRequest {
|
|
269
|
+
iconUrl: string;
|
|
270
|
+
title: string;
|
|
271
|
+
values: StoryValue[];
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export interface CreateStoryResponse {
|
|
275
|
+
story: Story | undefined;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export interface GetStoriesRequest {
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
export interface GetStoriesResponse {
|
|
282
|
+
stories: Story[];
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export interface UpdateStoryRequest {
|
|
286
|
+
story: Story | undefined;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
export interface UpdateStoryResponse {
|
|
290
|
+
story: Story | undefined;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export interface DeleteStoryRequest {
|
|
294
|
+
id: number;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
export interface DeleteStoryResponse {
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
export interface ReorderStoriesRequest {
|
|
301
|
+
ids: number[];
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
export interface ReorderStoriesResponse {
|
|
305
|
+
}
|
|
306
|
+
|
|
261
307
|
export interface Banner {
|
|
262
308
|
id: number;
|
|
263
309
|
imageUrl: string;
|
|
@@ -308,6 +354,21 @@ export interface Blog {
|
|
|
308
354
|
order: number;
|
|
309
355
|
}
|
|
310
356
|
|
|
357
|
+
export interface Story {
|
|
358
|
+
id: number;
|
|
359
|
+
iconUrl: string;
|
|
360
|
+
title: string;
|
|
361
|
+
values: StoryValue[];
|
|
362
|
+
order: number;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
export interface StoryValue {
|
|
366
|
+
id: number;
|
|
367
|
+
imageUrl: string;
|
|
368
|
+
button?: string | undefined;
|
|
369
|
+
link?: string | undefined;
|
|
370
|
+
}
|
|
371
|
+
|
|
311
372
|
export const CONTENT_V1_PACKAGE_NAME = "content.v1";
|
|
312
373
|
|
|
313
374
|
export interface BannerServiceClient {
|
|
@@ -414,6 +475,8 @@ export interface PublicContentServiceClient {
|
|
|
414
475
|
getPublicPartners(request: GetPublicPartnersRequest): Observable<GetPublicPartnersResponse>;
|
|
415
476
|
|
|
416
477
|
getPublicBlogs(request: GetPublicBlogsRequest): Observable<GetPublicBlogsResponse>;
|
|
478
|
+
|
|
479
|
+
getPublicStories(request: GetPublicStoriesRequest): Observable<GetPublicStoriesResponse>;
|
|
417
480
|
}
|
|
418
481
|
|
|
419
482
|
export interface PublicContentServiceController {
|
|
@@ -436,6 +499,10 @@ export interface PublicContentServiceController {
|
|
|
436
499
|
getPublicBlogs(
|
|
437
500
|
request: GetPublicBlogsRequest,
|
|
438
501
|
): Promise<GetPublicBlogsResponse> | Observable<GetPublicBlogsResponse> | GetPublicBlogsResponse;
|
|
502
|
+
|
|
503
|
+
getPublicStories(
|
|
504
|
+
request: GetPublicStoriesRequest,
|
|
505
|
+
): Promise<GetPublicStoriesResponse> | Observable<GetPublicStoriesResponse> | GetPublicStoriesResponse;
|
|
439
506
|
}
|
|
440
507
|
|
|
441
508
|
export function PublicContentServiceControllerMethods() {
|
|
@@ -446,6 +513,7 @@ export function PublicContentServiceControllerMethods() {
|
|
|
446
513
|
"getPublicFilials",
|
|
447
514
|
"getPublicPartners",
|
|
448
515
|
"getPublicBlogs",
|
|
516
|
+
"getPublicStories",
|
|
449
517
|
];
|
|
450
518
|
for (const method of grpcMethods) {
|
|
451
519
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
@@ -642,3 +710,54 @@ export function BlogServiceControllerMethods() {
|
|
|
642
710
|
}
|
|
643
711
|
|
|
644
712
|
export const BLOG_SERVICE_NAME = "BlogService";
|
|
713
|
+
|
|
714
|
+
export interface StoryServiceClient {
|
|
715
|
+
createStory(request: CreateStoryRequest): Observable<CreateStoryResponse>;
|
|
716
|
+
|
|
717
|
+
getStories(request: GetStoriesRequest): Observable<GetStoriesResponse>;
|
|
718
|
+
|
|
719
|
+
updateStory(request: UpdateStoryRequest): Observable<UpdateStoryResponse>;
|
|
720
|
+
|
|
721
|
+
deleteStory(request: DeleteStoryRequest): Observable<DeleteStoryResponse>;
|
|
722
|
+
|
|
723
|
+
reorderStories(request: ReorderStoriesRequest): Observable<ReorderStoriesResponse>;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
export interface StoryServiceController {
|
|
727
|
+
createStory(
|
|
728
|
+
request: CreateStoryRequest,
|
|
729
|
+
): Promise<CreateStoryResponse> | Observable<CreateStoryResponse> | CreateStoryResponse;
|
|
730
|
+
|
|
731
|
+
getStories(
|
|
732
|
+
request: GetStoriesRequest,
|
|
733
|
+
): Promise<GetStoriesResponse> | Observable<GetStoriesResponse> | GetStoriesResponse;
|
|
734
|
+
|
|
735
|
+
updateStory(
|
|
736
|
+
request: UpdateStoryRequest,
|
|
737
|
+
): Promise<UpdateStoryResponse> | Observable<UpdateStoryResponse> | UpdateStoryResponse;
|
|
738
|
+
|
|
739
|
+
deleteStory(
|
|
740
|
+
request: DeleteStoryRequest,
|
|
741
|
+
): Promise<DeleteStoryResponse> | Observable<DeleteStoryResponse> | DeleteStoryResponse;
|
|
742
|
+
|
|
743
|
+
reorderStories(
|
|
744
|
+
request: ReorderStoriesRequest,
|
|
745
|
+
): Promise<ReorderStoriesResponse> | Observable<ReorderStoriesResponse> | ReorderStoriesResponse;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
export function StoryServiceControllerMethods() {
|
|
749
|
+
return function (constructor: Function) {
|
|
750
|
+
const grpcMethods: string[] = ["createStory", "getStories", "updateStory", "deleteStory", "reorderStories"];
|
|
751
|
+
for (const method of grpcMethods) {
|
|
752
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
753
|
+
GrpcMethod("StoryService", method)(constructor.prototype[method], method, descriptor);
|
|
754
|
+
}
|
|
755
|
+
const grpcStreamMethods: string[] = [];
|
|
756
|
+
for (const method of grpcStreamMethods) {
|
|
757
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
758
|
+
GrpcStreamMethod("StoryService", method)(constructor.prototype[method], method, descriptor);
|
|
759
|
+
}
|
|
760
|
+
};
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
export const STORY_SERVICE_NAME = "StoryService";
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.4
|
|
4
|
+
// protoc v7.34.0
|
|
5
|
+
// source: crm_gift_card.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
|
+
import { Observable } from "rxjs";
|
|
10
|
+
|
|
11
|
+
export const protobufPackage = "crm_gift_card";
|
|
12
|
+
|
|
13
|
+
export interface ScanGiftCardQrRequest {
|
|
14
|
+
qrPayload: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface ScanGiftCardQrResponse {
|
|
18
|
+
success: boolean;
|
|
19
|
+
status: string;
|
|
20
|
+
error: string;
|
|
21
|
+
scanId: string;
|
|
22
|
+
userId: number;
|
|
23
|
+
uid: number;
|
|
24
|
+
cardBin: string;
|
|
25
|
+
cardId: number;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface GetGiftCardStatsRequest {
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface GetGiftCardStatsResponse {
|
|
32
|
+
sumGiftedSpends: string;
|
|
33
|
+
countGifted: number;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface ListGiftCardScansRequest {
|
|
37
|
+
page: number;
|
|
38
|
+
limit: number;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface GiftCardScanItem {
|
|
42
|
+
id: string;
|
|
43
|
+
userId: number;
|
|
44
|
+
uid: number;
|
|
45
|
+
cardBin: string;
|
|
46
|
+
status: string;
|
|
47
|
+
error: string;
|
|
48
|
+
createdAtUnixMs: number;
|
|
49
|
+
finalizedAtUnixMs: number;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface ListGiftCardScansResponse {
|
|
53
|
+
items: GiftCardScanItem[];
|
|
54
|
+
total: number;
|
|
55
|
+
page: number;
|
|
56
|
+
limit: number;
|
|
57
|
+
pages: number;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export const CRM_GIFT_CARD_PACKAGE_NAME = "crm_gift_card";
|
|
61
|
+
|
|
62
|
+
export interface CrmGiftCardServiceClient {
|
|
63
|
+
scanGiftCardQr(request: ScanGiftCardQrRequest): Observable<ScanGiftCardQrResponse>;
|
|
64
|
+
|
|
65
|
+
getGiftCardStats(request: GetGiftCardStatsRequest): Observable<GetGiftCardStatsResponse>;
|
|
66
|
+
|
|
67
|
+
listGiftCardScans(request: ListGiftCardScansRequest): Observable<ListGiftCardScansResponse>;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface CrmGiftCardServiceController {
|
|
71
|
+
scanGiftCardQr(
|
|
72
|
+
request: ScanGiftCardQrRequest,
|
|
73
|
+
): Promise<ScanGiftCardQrResponse> | Observable<ScanGiftCardQrResponse> | ScanGiftCardQrResponse;
|
|
74
|
+
|
|
75
|
+
getGiftCardStats(
|
|
76
|
+
request: GetGiftCardStatsRequest,
|
|
77
|
+
): Promise<GetGiftCardStatsResponse> | Observable<GetGiftCardStatsResponse> | GetGiftCardStatsResponse;
|
|
78
|
+
|
|
79
|
+
listGiftCardScans(
|
|
80
|
+
request: ListGiftCardScansRequest,
|
|
81
|
+
): Promise<ListGiftCardScansResponse> | Observable<ListGiftCardScansResponse> | ListGiftCardScansResponse;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function CrmGiftCardServiceControllerMethods() {
|
|
85
|
+
return function (constructor: Function) {
|
|
86
|
+
const grpcMethods: string[] = ["scanGiftCardQr", "getGiftCardStats", "listGiftCardScans"];
|
|
87
|
+
for (const method of grpcMethods) {
|
|
88
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
89
|
+
GrpcMethod("CrmGiftCardService", method)(constructor.prototype[method], method, descriptor);
|
|
90
|
+
}
|
|
91
|
+
const grpcStreamMethods: string[] = [];
|
|
92
|
+
for (const method of grpcStreamMethods) {
|
|
93
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
94
|
+
GrpcStreamMethod("CrmGiftCardService", method)(constructor.prototype[method], method, descriptor);
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export const CRM_GIFT_CARD_SERVICE_NAME = "CrmGiftCardService";
|
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.112",
|
|
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
|
@@ -15,6 +15,7 @@ service CardService {
|
|
|
15
15
|
rpc QuoteTopupByTarget(QuoteTopupByTargetRequest) returns (QuoteTopupByTargetResponse);
|
|
16
16
|
rpc ExecuteTopupWithLedger(ExecuteTopupWithLedgerRequest) returns (ExecuteTopupWithLedgerResponse);
|
|
17
17
|
rpc ExecuteCreateWithLedger(ExecuteCreateWithLedgerRequest) returns (ExecuteCreateWithLedgerResponse);
|
|
18
|
+
rpc ScanGiftCardQr(ScanGiftCardQrRequest) returns (ScanGiftCardQrResponse);
|
|
18
19
|
|
|
19
20
|
rpc ListCards(ListCardsRequest) returns (ListCardsResponse);
|
|
20
21
|
rpc ListCardsPaginated(ListCardsPaginatedRequest) returns (ListCardsPaginatedResponse);
|
|
@@ -230,6 +231,18 @@ message ExecuteCreateWithLedgerResponse {
|
|
|
230
231
|
}
|
|
231
232
|
|
|
232
233
|
|
|
234
|
+
message ScanGiftCardQrRequest {
|
|
235
|
+
int64 account_id = 1;
|
|
236
|
+
int64 uid = 2;
|
|
237
|
+
string bin = 3;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
message ScanGiftCardQrResponse {
|
|
241
|
+
bool success = 1;
|
|
242
|
+
string required_amount = 2;
|
|
243
|
+
int64 card_id = 3;
|
|
244
|
+
}
|
|
245
|
+
|
|
233
246
|
message ListCardsRequest {
|
|
234
247
|
int64 account_id = 1;
|
|
235
248
|
}
|
package/proto/content.proto
CHANGED
|
@@ -23,6 +23,7 @@ service PublicContentService {
|
|
|
23
23
|
rpc GetPublicFilials (GetPublicFilialsRequest) returns (GetPublicFilialsResponse);
|
|
24
24
|
rpc GetPublicPartners (GetPublicPartnersRequest) returns (GetPublicPartnersResponse);
|
|
25
25
|
rpc GetPublicBlogs (GetPublicBlogsRequest) returns (GetPublicBlogsResponse);
|
|
26
|
+
rpc GetPublicStories (GetPublicStoriesRequest) returns (GetPublicStoriesResponse);
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
service AboutService {
|
|
@@ -54,6 +55,14 @@ service BlogService {
|
|
|
54
55
|
rpc ReorderBlogs (ReorderBlogsRequest) returns (ReorderBlogsResponse);
|
|
55
56
|
}
|
|
56
57
|
|
|
58
|
+
service StoryService {
|
|
59
|
+
rpc CreateStory (CreateStoryRequest) returns (CreateStoryResponse);
|
|
60
|
+
rpc GetStories (GetStoriesRequest) returns (GetStoriesResponse);
|
|
61
|
+
rpc UpdateStory (UpdateStoryRequest) returns (UpdateStoryResponse);
|
|
62
|
+
rpc DeleteStory (DeleteStoryRequest) returns (DeleteStoryResponse);
|
|
63
|
+
rpc ReorderStories (ReorderStoriesRequest) returns (ReorderStoriesResponse);
|
|
64
|
+
}
|
|
65
|
+
|
|
57
66
|
// --- PUBLIC CONTENT MESSAGES ---
|
|
58
67
|
message GetPublicBannersRequest {}
|
|
59
68
|
|
|
@@ -73,6 +82,12 @@ message GetPublicBlogsResponse {
|
|
|
73
82
|
repeated Blog blogs = 1;
|
|
74
83
|
}
|
|
75
84
|
|
|
85
|
+
message GetPublicStoriesRequest {}
|
|
86
|
+
|
|
87
|
+
message GetPublicStoriesResponse {
|
|
88
|
+
repeated Story stories = 1;
|
|
89
|
+
}
|
|
90
|
+
|
|
76
91
|
// --- BANNER MESSAGES ---
|
|
77
92
|
|
|
78
93
|
message CreateBannerRequest {
|
|
@@ -290,6 +305,44 @@ message ReorderBlogsRequest {
|
|
|
290
305
|
|
|
291
306
|
message ReorderBlogsResponse {}
|
|
292
307
|
|
|
308
|
+
// --- STORY ---
|
|
309
|
+
|
|
310
|
+
message CreateStoryRequest {
|
|
311
|
+
string icon_url = 1;
|
|
312
|
+
string title = 2;
|
|
313
|
+
repeated StoryValue values = 3;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
message CreateStoryResponse {
|
|
317
|
+
Story story = 1;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
message GetStoriesRequest {}
|
|
321
|
+
|
|
322
|
+
message GetStoriesResponse {
|
|
323
|
+
repeated Story stories = 1;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
message UpdateStoryRequest {
|
|
327
|
+
Story story = 1;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
message UpdateStoryResponse {
|
|
331
|
+
Story story = 1;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
message DeleteStoryRequest {
|
|
335
|
+
int32 id = 1;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
message DeleteStoryResponse {}
|
|
339
|
+
|
|
340
|
+
message ReorderStoriesRequest {
|
|
341
|
+
repeated int32 ids = 1;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
message ReorderStoriesResponse {}
|
|
345
|
+
|
|
293
346
|
// --- MODELS ---
|
|
294
347
|
|
|
295
348
|
message Banner {
|
|
@@ -340,4 +393,19 @@ message Blog {
|
|
|
340
393
|
optional string published_at = 6;
|
|
341
394
|
string image_url = 7;
|
|
342
395
|
int32 order = 8;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
message Story {
|
|
399
|
+
int32 id = 1;
|
|
400
|
+
string icon_url = 2;
|
|
401
|
+
string title = 3;
|
|
402
|
+
repeated StoryValue values = 4;
|
|
403
|
+
int32 order = 5;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
message StoryValue {
|
|
407
|
+
int32 id = 1;
|
|
408
|
+
string image_url = 2;
|
|
409
|
+
optional string button = 3;
|
|
410
|
+
optional string link = 4;
|
|
343
411
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package crm_gift_card;
|
|
3
|
+
|
|
4
|
+
service CrmGiftCardService {
|
|
5
|
+
rpc ScanGiftCardQr (ScanGiftCardQrRequest) returns (ScanGiftCardQrResponse);
|
|
6
|
+
rpc GetGiftCardStats (GetGiftCardStatsRequest) returns (GetGiftCardStatsResponse);
|
|
7
|
+
rpc ListGiftCardScans (ListGiftCardScansRequest) returns (ListGiftCardScansResponse);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
message ScanGiftCardQrRequest {
|
|
11
|
+
string qr_payload = 1;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
message ScanGiftCardQrResponse {
|
|
15
|
+
bool success = 1;
|
|
16
|
+
string status = 2;
|
|
17
|
+
string error = 3;
|
|
18
|
+
string scan_id = 4;
|
|
19
|
+
int64 user_id = 5;
|
|
20
|
+
int64 uid = 6;
|
|
21
|
+
string card_bin = 7;
|
|
22
|
+
int64 card_id = 8;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
message GetGiftCardStatsRequest {}
|
|
26
|
+
|
|
27
|
+
message GetGiftCardStatsResponse {
|
|
28
|
+
string sum_gifted_spends = 1;
|
|
29
|
+
int64 count_gifted = 2;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
message ListGiftCardScansRequest {
|
|
33
|
+
int32 page = 1;
|
|
34
|
+
int32 limit = 2;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
message GiftCardScanItem {
|
|
38
|
+
string id = 1;
|
|
39
|
+
int64 user_id = 2;
|
|
40
|
+
int64 uid = 3;
|
|
41
|
+
string card_bin = 4;
|
|
42
|
+
string status = 5;
|
|
43
|
+
string error = 6;
|
|
44
|
+
int64 created_at_unix_ms = 7;
|
|
45
|
+
int64 finalized_at_unix_ms = 8;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
message ListGiftCardScansResponse {
|
|
49
|
+
repeated GiftCardScanItem items = 1;
|
|
50
|
+
int32 total = 2;
|
|
51
|
+
int32 page = 3;
|
|
52
|
+
int32 limit = 4;
|
|
53
|
+
int32 pages = 5;
|
|
54
|
+
}
|