@arbiwallet/contracts 1.0.110 → 1.0.111
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/content.ts +119 -0
- package/package.json +1 -1
- package/proto/content.proto +68 -0
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";
|
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.111",
|
|
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/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
|
}
|